<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<%@page import="br.ufpe.cin.rgms.membro.modelo.Membro"%>
<%@page import="br.ufpe.cin.rgms.linha.modelo.Linha"%>
<%@page import="br.ufpe.cin.rgms.membro.modelo.Estudante"%>
<%@page import="java.util.regex.Pattern"%><html>
<%@page import="br.ufpe.cin.rgms.util.Properties"%>

<% ServletContext servletContext = getServletContext(); %>

<head>
<title><%out.println(Properties.getProperty(this.getServletContext(),"time_pesquisa"));%></title>
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>
</head>

<body>

<div id="page">
	<div id="header"></div>
	
	<div id="mainarea">
	<div id="sidebar">
		<div id="headerleft">
			<h1><a href="home.jsp"><%out.println(Properties.getProperty(this.getServletContext(),"time_pesquisa"));%></a></h1>
		</div>
		<div id="menulinks">
			<a href="home.jsp"><%out.println(Properties.getProperty(this.getServletContext(),"home"));%></a>
			<a href="membros.jsp"><%out.println(Properties.getProperty(this.getServletContext(),"membros"));%></a>
			<a href="publicacoes.jsp"><%out.println(Properties.getProperty(this.getServletContext(),"publicacoes"));%></a>
			<a class="active" href="linhas.jsp"><%out.println(Properties.getProperty(this.getServletContext(),"linhas"));%></a>
		</div>
	</div>
	
	<div id="contentarea">
		<h2><%out.println(Properties.getProperty(this.getServletContext(),"alterar"));%></h2>
		<% Linha linha = ((Linha) request.getAttribute("linhaalterar"));
		 %>
		
		<p><%out.println(Properties.getProperty(this.getServletContext(),"alterar_dados_linha"));%></p>
		
		<FORM name="alterarmembro" action="AlterarDadosLinha.do" method="post" enctype="multipart/form-data">
    		<p>
    			<input type="hidden" name="idLinha" value="<%out.print(linha.getId()); %>">
    		
    			<LABEL for="nome"><%out.println(Properties.getProperty(this.getServletContext(),"nome"));%> </LABEL>
            	<INPUT onkeypress="return noenter();" type="text" name="nome" size="30" value="<% out.print(linha.getNome()); %>">
    			
    			<LABEL for="sumario"> <%out.println(Properties.getProperty(this.getServletContext(),"sumario"));%> </LABEL>
              	<INPUT onkeypress="return noenter();" type="text" name="sumario" size="30" value="<% out.print(linha.getSumario()); %>">
            </p>
            <p>
    			<LABEL for="descricao"> <%out.println(Properties.getProperty(this.getServletContext(),"descricao"));%> </LABEL>
              	<INPUT onkeypress="return noenter();" type="text" name="descricao" size="26" value="<% out.print(linha.getDescricao()); %>">
            <p>
              	<br>
    			<INPUT onclick="validarCampos();" name="cadastrar" value=<%out.println(Properties.getProperty(this.getServletContext(),"concluir"));%> type="submit">
    			<INPUT value=<%out.println(Properties.getProperty(this.getServletContext(),"limpar"));%> type="reset">
    		</p>
 		</FORM>
	</div>
	
		
	
	<div id="footer">
		<a href="http://www.free-css-templates.com/">Designed by Free CSS Templates</a>, Thanks to <a href="http://www.openwebdesign.org/">professional web design</a>
	</div>

	</div>
</div>

<script type="text/javascript">
	function noenter() {
  		return !(window.event && window.event.keyCode == 13);
	}

	function validarCampos(){ 
		if (document.alterarmembro.nome.value.length==0){ 
      	 	alert("<%Properties.getProperty(servletContext,"js_nome_invalid");%>");
      	 	document.alterarmembro.nome.focus();
      	 
      	 	return false; 
   		} 
   		if (document.alterarmembro.sobrenome.value.length==0){ 
      	 	alert("<%Properties.getProperty(servletContext,"js_sumario_invalid");%>");
      	 	document.alterarmembro.sobrenome.focus();
      	 
      	 	return false; 
   		}
   		if (document.alterarmembro.universidade.value.length==0){ 
      	 	alert("<%Properties.getProperty(servletContext,"js_descricao_invalid");%>");
      	 	document.alterarmembro.universidade.focus();
      	 
      	 	return false; 
   		}	
   		document.alterarmembro.submit();
	}
</script>

</body>

</html>
